<template>
  <el-tooltip :content="content" placement="bottom" effect="light" raw-content>
    <svg-icon style="margin-left: 5px" icon-class="question"></svg-icon>
  </el-tooltip>
</template>
<script lang="ts" setup>
  import { ref, computed } from 'vue'
  let helpJson = require('./icon-help.json')

  const props = defineProps({
    title: {
      type: String,
      default: '',
    },
  })
  // const disabled = ref(false)
  const content = computed(() => {
    console.log('typeof helpJson =' + typeof helpJson)
    const helpTips = helpJson[props.title]
    return helpTips
  })
  // function searchDocs() {
  //   const helpTips = helpJson(props.title)
  //   if (helpTips) {
  //     disabled.value = true
  //     content.value = helpTips
  //   } else {
  //     disabled.value = false
  //     content.value = ''
  //   }
  // }
</script>
